#pragma once

class CConnectionActiveX: public CBaseNodeItem<CConnectionActiveX>  
{
public:
	CConnectionActiveX()
	{
		memset(&m_scopeDataItem, 0, sizeof(SCOPEDATAITEM));
		m_scopeDataItem.mask = SDI_STR | SDI_IMAGE | SDI_OPENIMAGE | SDI_PARAM | SDI_CHILDREN;
		m_scopeDataItem.displayname = MMC_CALLBACK;
		m_scopeDataItem.nImage = 0; 		
		m_scopeDataItem.nOpenImage = 1;
		m_scopeDataItem.lParam = (LPARAM) this;
		memset(&m_resultDataItem, 0, sizeof(RESULTDATAITEM));
	}

	STDMETHOD(GetResultViewType)(LPOLESTR *ppViewType,long *pViewOptions)
	{
		LPOLESTR lpOleStr = L"{C4D2D8E0-D1DD-11CE-940F-008029004347}";
		*ppViewType = static_cast<LPOLESTR>(CoTaskMemAlloc((wcslen(lpOleStr) + 1) * sizeof(WCHAR)));
		wcscpy(*ppViewType, lpOleStr);

		*pViewOptions = MMC_VIEW_OPTIONS_NONE;
		return S_FALSE;
	}
	LPOLESTR GetResultPaneColInfo(int nCol)
	{
	   switch (nCol)
	   {
	   case 0:
		  return m_bstrDisplayName;
	   case 1:
		  return OLESTR("Display System Monitor Control");
	   }

	   return OLESTR("Override GetResultPaneColInfo");
	}
};

